.floating-nav {
    position: fixed;
    top: 0.75rem;
    left: 50%;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: max-content;
    max-width: calc(100vw - 1rem);
    box-sizing: border-box;
    padding: 0.5rem;
    border-radius: 100px;
    background-color: #7888ad;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.2);
    transform: translateX(-50%);
}

.nav-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.menu-toggle {
    display: none;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.6rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #0d1b2a;
    cursor: pointer;
    font: 0.875rem/1.2 system-ui, sans-serif;
    font-weight: 700;
}

.page-links {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
}

.social-links {
    flex-shrink: 0;
    padding-left: 0.5rem;
    border-left: 1px solid rgba(13, 27, 42, 0.2);
}

.nav-link {
    flex: 0 0 auto;
    padding: 0.45rem 0.6rem;
    border-radius: 999px;
    color: #0d1b2a;
    transition: transform 0.5s ease, color 0.5s ease;
    font: 0.875rem/1.2 system-ui, sans-serif;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link:focus-visible {
    color: #f6f5f1;
}

.nav-link:focus-visible {
    outline: 2px solid #0d1b2a;
    outline-offset: 2px;
}

main {
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    box-sizing: border-box;
    padding-top: 5rem;
}

img {
    display: block;
    width: 100%;
    height: auto;
    max-height: calc(100vh - 5rem);
    max-height: calc(100dvh - 5rem);
    object-fit: contain;
}

@media (max-width: 600px) {
    .floating-nav {
        width: calc(100vw - 1rem);
        flex-wrap: wrap;
        gap: 0.4rem;
        padding: 0.35rem;
        border-radius: 12px;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .page-links {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        order: 3;
        max-height: 60vh;
        overflow-y: auto;
        padding-top: 0.35rem;
        border-top: 1px solid rgba(13, 27, 42, 0.2);
    }

    .page-links.is-open {
        display: flex;
    }

    .social-links {
        order: 2;
    }

    .nav-link {
        padding: 0.4rem 0.5rem;
        font-size: 0.75rem;
    }
}
